package com.itheima.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CheckGroupMapper {

    //获取有关联关系的检查项的检测组数量
    @Select("select count(*) from t_checkgroup_checkitem where checkitem_id = #{id}")
    Integer CountByCheckItemId(Integer id);

    /**
     * 通过检查组id查询检查组关联的检查项id
     * @param id
     * @return
     */
    @Select("select checkitem_id from t_checkgroup_checkitem where checkgroup_id = #{id}")
    Integer[] CountByCheckGroupId(Integer id);
}
